package cn.orangeframe.neon.ui.web;

import cn.orangeframe.neon.ui.model.LoginModel;
import cn.orangeframe.neon.ui.model.Response;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collections;
import java.util.Map;

@RestController
public class LoginController {

    @PostMapping("/login")
    public Response login(@RequestBody LoginModel loginModel) {
        Map<String, String> data = Collections.singletonMap("token", "YWRtaW4=");
        return Response.success(data);
    }

    @GetMapping("/logout")
    public Response logout() {
        return Response.success();
    }
}
